#ifndef CREPLICATIONFORM_H
#define CREPLICATIONFORM_H

#include <QDialog>
#include <QMap>
#include <QRadioButton>

namespace Ui {
    class CReplicationForm;
}

class CReplicationForm : public QDialog {
    Q_OBJECT
public:
    CReplicationForm(QWidget *parent = 0);
    ~CReplicationForm();

    QString actionById(int);
    QString login();
    QString password();
    int action();

    enum
    {
        Synchronize,
        Fetch,
        Upload,
        Replace
    };

protected:
    void changeEvent(QEvent *e);

public slots:
    void buttonToggled();
    void checkFields();

private:
    Ui::CReplicationForm *m_ui;
    int m_currentButton;
    QMap<int, QRadioButton*> m_buttons;
};

#endif // CREPLICATIONFORM_H
